package club.xshiwu.springcloud.service;

import club.xshiwu.springcloud.pojo.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * 账户微服务
 * Created by Intellij IDEA.
 * Date:  2020/6/12
 * @author xsw
 */
@FeignClient(value = "seata-account-service")
public interface AccountService {
    /**
     *
     * @param userId 用户id
     * @param money 账户金额
     * @return 账户余额
     */
    @PostMapping("/account/decrease")
    CommonResult decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
